#pragma once
#include "event/MessengerEventBase.h"
#include "Input.h"



class Event_Control_Changed : public Boon::MessengerEventBase
{
public:
	static const Boon::EventType			ID = 0xe10b4e01;

	Event_Control_Changed()
		: Boon::MessengerEventBase(), m_Jump( nullptr ),
			m_Left( nullptr ), m_Right( nullptr ), m_Attack( nullptr )
	{
		Boon::Input& input = Boon::Input::GetInstance();
		input.AddCommand( "Jump", Boon::KEY_SPACE, &m_Jump );
		input.AddCommand( "Left", Boon::KEY_A, &m_Left );
		input.AddCommand( "Right", Boon::KEY_D, &m_Right );
		input.AddCommand( "Attack", Boon::KEY_LSHIFT, &m_Attack );
	}

	virtual const Boon::EventType			GetEventID() const
	{
		return ID;
	}

	virtual void							Serialize( std::ostream& out ) const
	{
		throw std::exception("The method or operation is not implemented.");
	}

	virtual Boon::IMessengerEventStrong		Copy() const
	{
		return new Event_Control_Changed();
	}

	virtual const char*						GetName() const
	{
		return "Event_Control_Changed";
	}

	Boon::Command*				m_Jump;
	Boon::Command*				m_Left;
	Boon::Command*				m_Right;
	Boon::Command*				m_Attack;
};